﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using Telerik.Windows.Controls;
using System.Windows.Media.Imaging;

namespace TotalSystems.Core.Controls
{
    public partial class TabItemHeader : UserControl
    {
        public TabItemHeader(string Name, string Txt, string IconUrl, RadTabControl rtc, RadTabItem rti)
        {
            InitializeComponent();
            TB_Text.Text = Txt;
            Image_Icon.Source = new BitmapImage(new Uri(IconUrl, UriKind.Relative));

            Image_Close.MouseLeftButtonUp += (s, ee) => { rtc.Items.Remove(rti); rti.Content = null; rti.DataContext = null; rti.Header = null; rti.IsBreak = true;};

        }

    }
}
